package com.chenshu.domain;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;

import java.util.Date;
import java.util.UUID;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-29
 * Time：14:28
 */
@Data
public class Order {
    private String id = UUID.randomUUID().toString();

    @DateTimeFormat(pattern = "yyyy/MM/dd hh:mm:ss")
    private Date orderTime = new Date();

    @NumberFormat(style = NumberFormat.Style.NUMBER, pattern = "###,###")
    private int num;

    @NumberFormat(pattern = "#,###.##")
    private Double price;

    @NumberFormat(style = NumberFormat.Style.PERCENT)
    private Double discount;
}
